import Tarbar from '@/components/tar-bar/index'
import Navbar from '@/components/nav-bar'
import Navbar03 from '@/components/nav-bar/index03'
import Home from '@/views/home'
import Shop from '@/views/shop'
import Cart from '@/views/cart'
import Mine from '@/views/mine'
import Detail from '@/views/detail'
import Order from '@/views/order'
import Address from '@/views/address'
import Login from '@/views/login'
import Register from '@/views/register'
import ToTop from '@/components/to-top'
const routes = [
  {
    path: '/',
    redirect: 'home',
  },
  {
    path: '/home',
    name: 'home',
    components: {
      header: Navbar,
      default: Home,
      toTop: ToTop,
      footer: Tarbar,
    },
  },
  {
    path: '/shop',
    name: 'shop',
    components: {
      header: Navbar,
      default: Shop,
      footer: Tarbar,
    },
  },
  {
    path: '/address',
    name: 'address',
    components: {
      default: Address,
    },
  },
  {
    path: '/cart',
    name: 'cart',
    components: {
      header: Navbar03,
      default: Cart,
      footer: Tarbar,
    },
  },
  {
    path: '/mine',
    name: 'mine',
    components: {
      header: Navbar03,
      default: Mine,
      footer: Tarbar,
    },
  },
  {
    path: '/detail/:id',
    name: 'detail',
    components: {
      default: Detail,
    },
  },
  {
    path: '/login',
    name: 'login',
    components: {
      default: Login,
    },
  },
  {
    path: '/register',
    name: 'register',
    components: {
      default: Register,
    },
  },
  {
    path: '/order',
    name: 'order',
    components: {
      default: Order,
    },
  },
]
export default routes
